/**
 * 课程的数据模拟
 * @time 2018/04/14
 */
import {
  getTime,
  getOneImage,
  getNatural,
  getCword,
  getOneVideo,
} from './index';

export default function getListData(length = 10) {
  const data = [];
  for (let i = 0; i < length; i++) {
    data.push({
      img: getOneImage(),
      title: getCword(8, 18),
      time: getTime(i),
      view: getNatural(0, 2000),

      // courseDetail
      video: getOneVideo(), // 视频的地址
      description: getCword(50, 100), // 课程介绍
    });
  }
  return data;
}
